.data
.global	n
	.type	n,%object
	.size	n,4
n:
	.int	0
.text
.global	bubblesort
	.type	bubblesort,%function
bubblesort:
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp,#-8]
	ldr	r0, =0
	str	r0, [fp,#-12]
L0:
	ldr	r0, =1
	push	{r0}
	ldr	r1, L1
	ldr	r0, [r1,#0]
	mov	r1, r0
	pop	{r2}
	sub	r0, r1, r2
	push	{r0}
	ldr	r0, [fp,#-12]
	mov	r1, r0
	pop	{r2}
	cmp	r1, r2
	mov	r0, #0
	movlt	r0, #1
	cmp	r0, #0
	bne	L2
	b	L3
L2:
	ldr	r0, =0
	str	r0, [fp,#-16]
L4:
	ldr	r0, =1
	push	{r0}
	ldr	r0, [fp,#-12]
	push	{r0}
	ldr	r1, L1
	ldr	r0, [r1,#0]
	mov	r1, r0
	pop	{r2}
	sub	r0, r1, r2
	mov	r1, r0
	pop	{r2}
	sub	r0, r1, r2
	push	{r0}
	ldr	r0, [fp,#-16]
	mov	r1, r0
	pop	{r2}
	cmp	r1, r2
	mov	r0, #0
	movlt	r0, #1
	cmp	r0, #0
	bne	L5
	b	L6
L5:
	ldr	r1, [fp,#-8]
	mov	r5, #0
	ldr	r0, [fp,#-16]
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, r1
	ldr	r0, [r0,#0]
	push	{r0}
	ldr	r1, [fp,#-8]
	mov	r5, #0
	ldr	r0, =1
	push	{r0}
	ldr	r0, [fp,#-16]
	mov	r1, r0
	pop	{r2}
	add	r0, r1, r2
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, r1
	ldr	r0, [r0,#0]
	mov	r1, r0
	pop	{r2}
	cmp	r1, r2
	mov	r0, #0
	movgt	r0, #1
	cmp	r0, #0
	bne	L7
	b	L8
L7:
	ldr	r1, [fp,#-8]
	mov	r5, #0
	ldr	r0, =1
	push	{r0}
	ldr	r0, [fp,#-16]
	mov	r1, r0
	pop	{r2}
	add	r0, r1, r2
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, r1
	ldr	r0, [r0,#0]
	str	r0, [fp,#-20]
	mov	r5, #0
	ldr	r0, =1
	push	{r0}
	ldr	r0, [fp,#-16]
	mov	r1, r0
	pop	{r2}
	add	r0, r1, r2
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	ldr	r5, [fp,#-8]
	add	r0, r0, r5
	push	{r0}
	ldr	r1, [fp,#-8]
	mov	r5, #0
	ldr	r0, [fp,#-16]
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, r1
	ldr	r0, [r0,#0]
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, [fp,#-16]
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	ldr	r5, [fp,#-8]
	add	r0, r0, r5
	push	{r0}
	ldr	r0, [fp,#-20]
	pop	{r1}
	str	r0, [r1,#0]
L8:
	ldr	r0, =1
	push	{r0}
	ldr	r0, [fp,#-16]
	mov	r1, r0
	pop	{r2}
	add	r0, r1, r2
	str	r0, [fp,#-16]
	b	L4
L6:
	ldr	r0, =1
	push	{r0}
	ldr	r0, [fp,#-12]
	mov	r1, r0
	pop	{r2}
	add	r0, r1, r2
	str	r0, [fp,#-12]
	b	L0
L3:
	ldr	r0, =0
	b	L9
L9:
	sub	sp, fp, #4
	pop	{fp, lr}
	bx	lr
L1:
	.word	n
	.size	bubblesort,.-bubblesort
.global	main
	.type	main,%function
main:
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r0, =10
	ldr	r1, L10
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =0
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =4
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =1
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =3
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =2
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =9
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =3
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =2
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =4
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =0
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =5
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =1
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =6
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =6
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =7
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =5
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =8
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =7
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	ldr	r0, =9
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	push	{r0}
	ldr	r0, =8
	pop	{r1}
	str	r0, [r1,#0]
	mov	r5, #0
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, fp, #-44
	bl	bubblesort
	str	r0, [fp,#-48]
L11:
	ldr	r1, L10
	ldr	r0, [r1,#0]
	push	{r0}
	ldr	r0, [fp,#-48]
	mov	r1, r0
	pop	{r2}
	cmp	r1, r2
	mov	r0, #0
	movlt	r0, #1
	cmp	r0, #0
	bne	L12
	b	L13
L12:
	mov	r5, #0
	ldr	r0, [fp,#-48]
	mov	r6, #1
	mul	r0, r0, r6
	add	r5, r0, r5
	mov	r0, r5
	mov	r5, #4
	mul	r0, r0, r5
	add	r0, r0, #-44
	add	r0, r0, fp
	ldr	r0, [r0,#0]
	str	r0, [fp,#-52]
	ldr	r0, [fp,#-52]
	bl	putint
	ldr	r0, =10
	str	r0, [fp,#-52]
	ldr	r0, [fp,#-52]
	bl	putch
	ldr	r0, =1
	push	{r0}
	ldr	r0, [fp,#-48]
	mov	r1, r0
	pop	{r2}
	add	r0, r1, r2
	str	r0, [fp,#-48]
	b	L11
L13:
	ldr	r0, =0
	b	L14
L14:
	sub	sp, fp, #4
	pop	{fp, lr}
	bx	lr
L10:
	.word	n
	.size	main,.-main
